package com.yanqu.road.entity.activity.businessdepart;

import com.yanqu.road.entity.DataObject;

import java.util.Objects;

public class BusinessDepartUserData extends DataObject {

    /**
     * 玩家ID
     */
    private long userId;

    /**
     * 活动ID
     */
    private int activityId;

    /**
     * 累计消耗积分
     */
    private long costNum;

    /**
     * 创建时间
     */
    private long createTime;

    public BusinessDepartUserData() {
    }

    public BusinessDepartUserData(long userId, int activityId) {
        this.userId = userId;
        this.activityId = activityId;
        this.costNum = 0;
        this.createTime = System.currentTimeMillis();
        setInsertOption();
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getCostNum() {
        return costNum;
    }

    public void setCostNum(long costNum) {
        if (this.costNum != costNum) {
            this.costNum = costNum;
            setUpdateOption();
        }
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        if (this.createTime != createTime) {
            this.createTime = createTime;
            setUpdateOption();
        }
    }
}
